<!-- ItemList.vue -->
<template>
  <div class="item_list">
    <div class="header">
      <slot></slot>
      <p>
        <span>查看全部</span>
        <i class="el-icon-arrow-right"></i>
      </p>
    </div>
    <div class="goods_list">
      <div class="goods_item">
        <img src="http://zhoushugang.gitee.io/erabbit-client-pc-static/uploads/clothes_goods_3.jpg" alt="">
        <p class="name ellipsis">东五样极所海她任关年于同应造局展不争般</p>
        <p class="desc ellipsis">每越总海证地</p>
        <p class="price">¥148.59</p>
      </div>
      <div class="goods_item">
        <img src="http://zhoushugang.gitee.io/erabbit-client-pc-static/uploads/clothes_goods_3.jpg" alt="">
        <p class="name ellipsis">东五样极所海她任关年于同应造局展不争般</p>
        <p class="desc ellipsis">每越总海证地</p>
        <p class="price">¥148.59</p>
      </div>
      <div class="goods_item">
        <img src="http://zhoushugang.gitee.io/erabbit-client-pc-static/uploads/clothes_goods_3.jpg" alt="">
        <p class="name ellipsis">东五样极所海她任关年于同应造局展不争般</p>
        <p class="desc ellipsis">每越总海证地</p>
        <p class="price">¥148.59</p>
      </div>
      <div class="goods_item">
        <img src="http://zhoushugang.gitee.io/erabbit-client-pc-static/uploads/clothes_goods_3.jpg" alt="">
        <p class="name ellipsis">东五样极所海她任关年于同应造局展不争般</p>
        <p class="desc ellipsis">每越总海证地</p>
        <p class="price">¥148.59</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name: "ItemList",
    async created() {
      // 收藏数据
      // const res = await this.$http.getCollect({collectType:1})
      // console.log(res);
    }
}
</script>
<style lang='scss' scoped>
.item_list {
  background-color: #fff;
  padding: 0 20px;
  margin-top: 20px;
  height: 400px;
  .header {
    height: 66px;
    border-bottom: 1px solid #f5f5f5;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    box-sizing: border-box;
    h4 {
      font-size: 22px;
      font-weight: 400;
    }
    p {
      margin-bottom: 2px;
      span {
        font-size: 16px;
        vertical-align: middle;
        margin-right: 4px;
        color: #999;
      }
      i {
        font-size: 14px;
        vertical-align: middle;
        position: relative;
        top: 2px;
        color: #ccc;
      }
    }
  }
  .goods_list {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
    .goods_item {
      display: block;
      width: 220px;
      padding: 20px 30px;
      text-align: center;
      transition: all .5s;
      box-sizing: border-box;
      img {
        width: 160px;
        height: 160px;
      }
      p {
        padding-top: 10px;
      }
      .ellipsis {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
      .name {
        font-size: 16px;
      }
      .desc {
        color: #999;
        height: 29px;
      }
      .price {
        color: #cf4444;
        font-size: 20px;
      }
    }
  }
}
</style>